import { createApp } from "vue";

import "@/assets/font/iconfont.css";
import "@/style/global.less";
import router from "@/router/index";
import BaseLayout from "@/layout/base/index.vue";
import DemoBlock from "@/component/DemoBlock.vue";
import Version from "@/component/Version.vue";
import CodeContent from "@/component/Code.vue";
import Icon from "@/component/Icon.vue";

const app = createApp(BaseLayout);
app.component("DemoBlock", DemoBlock);
app.component("Version", Version);
app.component("CodeContent", CodeContent);
app.component("Icon", Icon);

if (process.env.NODE_ENV === "development") {
    import("design/dev").then((res) => {
        app.use(res.default);
    });
} else {
    import("design").then((res) => {
        app.use(res.default);
    });
}

app.use(router).mount("#design");
